<?
/*

    This file is part of Blue Violin.

    Blue Violin is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Blue Violin is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero Public License for more details.

    You should have received a copy of the GNU Affero Public License
    along with Blue Violin.  If not, see <http://www.gnu.org/licenses/>.

    Blue Violin  Copyright (C) 2008  Blue Violin, Inc. & Josh Watts <josh.watts@blueviolin.org>
	For more information, visit http://www.blueviolin.org/

    This program comes with ABSOLUTELY NO WARRANTY.

*/
require_once("../../general.php");
require_once("../classes/Security.php");
require_once("../classes/Profiles.php");
session_start();

$oProfiles = new BVProfiles();
$aRows = $oProfiles->GetProfiles();


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
		<link rel="stylesheet" href="../css/app.css" type="text/css"/>
		<title>
			Edit Profile
		</title>
		<script src="../scripts/json.js">
		</script>
		<script src="../scripts/general.js">
		</script>

		<script src="../scripts/dialogs/EditProfile.js">
		</script>

	</head>
	<body onload="EditProfileBodyLoad()">

		<div id="divTitle" class="DialogTitle">
			Edit Profile
		</div>

		<div
			id="divProfileList" 
			class="FileList" 
			unselectable="on"
			>

<?
for ($i = 0;
	 $i < count($aRows);
	 $i++)
{
?>
<div class="FileListItem" id="<?= $aRows[$i]["profile_guid"] ?>" >
	<img 
		src="../images/dialogs/profile_24_normal.gif"
		class="FileImage"
		width="24"
		height="24"
		/>
	<?= $aRows[$i]["name"] ?>
</div>
<?
}
?>
		</div>

		 <div style="margin: 3px;">

			 <div class="DialogProperty">

				 <div class="Title">
					 Profile Name
				 </div>

				 <div>
					 <input type="text" id="txtProfileName" class="DialogTextBox" style="width: 340px !important;"/>
				 </div>

			 </div>

			 <div class="DialogProperty">
				 <div class="Title">
					 Default website
				 </div>

				 <div>
					 <input type="text" id="txtDefaultUrl" class="DialogTextBox" style="width: 340px !important;"/>
				 </div>
			 </div>

			 <div class="DialogProperty">

				 <div class="Title">
					 Email Preferences
				 </div>
				 <div>
					 <span style="float: left; margin-right: 3px; vertical-align: top;">
						 <input type="checkbox" id="checkEmailOnlyOnFail" />
					 </span>
					 <label for="checkEmailOnlyOnFail" style="float: left; vertical-align: top; padding-right: 3px;">
						 Only send an email receipt when a replay fails
					 </label>
				 </div>

			 </div>

			 <div
				 class="ButtonRow"
				 >
				 <input
					 type="button"
					 id="btnSave"
					 class="Button"
					 value="Save"
					 />

				 <input
					 type="button"
					 id="btnCancel"
					 class="Button"
					 value="Cancel"
					 />
			 </div>

		 </div>

	 </body>

</html>